import request from '@/api/request/index'
import type { GongYongDTO, GongYingShangXiangQingDTO, GengXinGongYingShangXinXi } from './_interfaces.ts'

/** 文件删除 */
export function supplierDelPhotoInfos(data: GongYongDTO): Promise<any> {
  return request.delete('/api/supplier/delPhotoInfos', data)
}

/** 供应商信息查询 */
export function supplierQuerySupplierInfo(data: { supplierCode?: string }): Promise<GongYingShangXiangQingDTO> {
  return request.get('/api/supplier/querySupplierInfo', data)
}

/** 修改供应商信息 */
export function supplierUpdateSupInfo(data: GengXinGongYingShangXinXi): Promise<any> {
  return request.post('/api/supplier/updateSupInfo', data)
}

/** 供应商图册信息上传 */
export function supplierUpload(data: {
  // 图册信息
  files?: File[]
  // 供应商ID
  supplierId?: string
}): Promise<string> {
  return request.post('/api/supplier/upload')
}
